<?php

class mcp_dnd_list_chars
{
	function main($id, $mode)
	{
		global $db, $user, $auth, $template, $dndlist;
		
		
		switch($mode){
			case 'index':
				$this->page_title = 'MCP_DND';
				$this->tpl_name = 'mcp_dnd_list_chars';
				$template->assign_var('GREETING', 'Hello, World!');
				break;
			
			case 'alignments':
				$this->page_title = 'MCP_DND';
				$this->tpl_name = 'mcp_dnd_alignments';
				
				$template->assign_var('GREETING', 'Hello, ');
				$username = request_var('username', $user->data['username'], true);
				$template->assign_var('USERNAME', $username);
				
				$dndlist->getAlignments();
				
				foreach ($dndlist->alignments as $row)
				{
					$template->assign_block_vars('list_alignments', array(
						'NAME'	=> $row['name'],
						'SHORT'	=> $row['short'],
					));
				$dndlist->freeClasses();
				}
				
				break;
		}
	}
}
?>

